package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.PropertyFacility;
import org.apache.ibatis.annotations.Param;

/**
 * 公共设施档案Mapper接口
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
public interface PropertyFacilityMapper 
{
    /**
     * 查询公共设施档案
     * 
     * @param facilityId 公共设施档案主键
     * @return 公共设施档案
     */
    public PropertyFacility selectPropertyFacilityByFacilityId(Long facilityId);

    /**
     * 查询公共设施档案列表
     * 
     * @param propertyFacility 公共设施档案
     * @return 公共设施档案集合
     */
    public List<PropertyFacility> selectPropertyFacilityList(PropertyFacility propertyFacility);

    /**
     * 新增公共设施档案
     * 
     * @param propertyFacility 公共设施档案
     * @return 结果
     */
    public int insertPropertyFacility(PropertyFacility propertyFacility);

    /**
     * 修改公共设施档案
     * 
     * @param propertyFacility 公共设施档案
     * @return 结果
     */
    public int updatePropertyFacility(PropertyFacility propertyFacility);

    /**
     * 删除公共设施档案
     * 
     * @param facilityId 公共设施档案主键
     * @return 结果
     */
    public int deletePropertyFacilityByFacilityId(Long facilityId);

    /**
     * 批量删除公共设施档案
     * 
     * @param facilityIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePropertyFacilityByFacilityIds(Long[] facilityIds);

    // 按类型查询设施
    List<PropertyFacility> selectByType(@Param("buildingId") Long buildingId, @Param("facilityType") String facilityType);

    // 查询需要维护的设施（状态异常或超期未维护）
    List<PropertyFacility> selectNeedMaintainFacilities(Long buildingId);
}
